import sys
from PyQt4 import QtGui
from PyQt4.QtGui import  QApplication,QFileDialog
from PyQt4.QtCore import  SIGNAL,QRect,QObject,SLOT
import ui_DlgMethod
class dlgmethod(QtGui.QDialog):
    ui=ui_DlgMethod.Ui_DlgMethod();
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.ui.setupUi(self)
      
        
if __name__ == "__main__":
    a = QApplication(sys.argv)
    QObject.connect(a,SIGNAL("lastWindowClosed()"),a,SLOT("quit()"))
    w =dlgmethod()
    w.show()
    sys.exit(a.exec_())